<template>
	<view>
		<view v-for="(item,index) in list" @click="sDel=true;act_item=item"></view>
		<!--删除弹窗-->
		<u-modal :show="sDel" cancelText="暂不删除"    @cancel="sDel=false" @confirm="comDel"  :showCancelButton="true"  closeOnClickOverlay class="box">
			<view class="tip-text pt-30 pb-30 fz30">
				确定删除数据？
			</view>
		</u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:{},
				sDel:false,
				act_item:{}
			}
		},
		methods: {
			comDel(){
				this.$api['del']('user/delete-address'+this.act_item.id, {}).then(res => {
					if (res.code == 200) {
						this.sDel=false;
						this.$toast({
							title: "删除成功"
						});
						this.param.page = 1;
						this.getList();
					}
				});
			},
		}
	}
</script>

<style>

</style>
